package com.dataexa.ky.core.utils.exception;

/**
 * @Author: Michael
 * @Date: 2020/3/28 11:11 下午
 */
public enum SystemCode {
    SUCCESS("0", "success"),
    ERR_CONNECT_FAIL("1005101", "connect failed"),
    ERR_CONNECT_TIMEOUT("1005102", "connect timeout"),
    ERR_RPC_TIMEOUT("1005103", "rpc timeout"),
    ERR_INVAILD_RETURN("1005104", "invalid return format"),
    ERR_NO_ACCESS_LIMIT("1005105", "no access limit"),
    ERR_INVAILD_PARAM("1005106", "invalid param"),
    ERR_OVER_ACCESS_LMT("1005107", "over access limit"),
    ERR_DB_FAIL("1005108", "db action failed"),
    ERR_REDIS_FAIL("1005109", "redis action failed"),
    ERR_MQ_FAIL("1005110", "mq action failed"),
    ERR_JMF_EXCEPTION("1005111", "jmf internal exception"),
    ERR_INVAILD_CMD("1005112", "invalid command"),
    ERR_INVAILD_LOGIN_STATE("1005113", "please login first"),
    ERR_OTHER_SYSTEM_ERROR("1005114", "system error");

    private String code;
    private String text;

    private SystemCode(String code, String text) {
        this.code = code;
        this.text = text;
    }

    public String getCode() {
        return this.code;
    }

    public String getText() {
        return this.text;
    }

    public String toString() {
        return "[" + this.code + "] " + this.text;
    }
}

